import request from '../request'

const Api = {
  page: '/api/admincourseOutline/courseOutline/page',
  save: '/api/admincourseOutline/courseOutline/save',
  remove: '/api/admincourseOutline/courseOutline/remove',
  selectById: '/api/admincourseOutline/courseOutline/selectById',
  update: '/api/admincourseOutline/courseOutline/update',
  upload: '/api/admincourseOutline/courseOutline/multipartUpload',
  uploadSin: '/api/sys/oss/upload',
}

/** 新增课程基本信息 */
export const saveOutline = data => {
  return request.request({
    url: Api.save,
    data,
    method: 'POST'
  })
}

export const updateOutline = data => {
  return request.request({
    url: Api.update,
    data,
    method: 'PUT'
  })
}

export const pageOutline = params => {
  return request.request({
    url: Api.page,
    params,
    method: 'GET'
  })
}

export const removeOutline = params => {
  return request.request({
    url: Api.remove,
    params,
    method: 'DELETE'
  })
}

export const selectById = params => {
  return request.request({
    url: Api.selectById,
    params,
    method: 'GET'
  })
}
/** 文件上传 */
export const upload = data => {
  return request.request({
    url: Api.upload,
    data,
    method: 'post'
  })
}
/** 文件上传 */
export const uploadSin = data => {
  return request.request({
    url: Api.uploadSin,
    data,
    method: 'post'
  })
}